package com.fuyd.pms.background.repository;

import com.fuyd.pms.entity.Region;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * 地区表的dao层
 * Created by fuyongde on 2016/1/13.
 */
public interface RegionDao extends PagingAndSortingRepository<Region, String>, JpaSpecificationExecutor<String> {

    /**
     * 根据父级id查询地区列表
     *
     * @param parentId 父级id
     * @return 地区列表
     */
    List<Region> findByParentId(String parentId);
}
